-- GENERATED SPELL FOR [The Kurken] --


function spell0_17447(pUnit, Event) --@Bite,n/a--
pUnit:FullCastSpellOnTarget(17261,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17447', 561, 1)
end

function spell1_17447(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(16697,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17447', 0, 1)
end

function spell2_17447(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14920,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17447', 0, 1)
end

function spell3_17447(pUnit, Event) --@Lava Breath,n/a--
pUnit:FullCastSpellOnTarget(58609,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17447', 10000, 1)
end

function spell4_17447(pUnit, Event) --@Rabid,Self--
pUnit:FullCastSpellOnTarget(53401,pUnit)
pUnit:RegisterEvent('Sorts_17447', 20000, 1)
end

function Sorts_17447(pUnit, Event)
local choix_sorts_17447 = math.random(0, 4)
if choix_sorts_17447 == 0 then
pUnit:RegisterEvent('spell0_17447', 1, 1)
end
if choix_sorts_17447 == 1 then
pUnit:RegisterEvent('spell1_17447', 1, 1)
end
if choix_sorts_17447 == 2 then
pUnit:RegisterEvent('spell2_17447', 1, 1)
end
if choix_sorts_17447 == 3 then
pUnit:RegisterEvent('spell3_17447', 1, 1)
end
if choix_sorts_17447 == 4 then
pUnit:RegisterEvent('spell4_17447', 1, 1)
end
end

function mob17447_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17447', math.random(1500, 3000), 1)
end

function mob17447_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17447_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17447_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17447, 1, 'mob17447_Action')
RegisterUnitEvent(17447, 2, 'mob17447_Leave')
RegisterUnitEvent(17447, 3, 'mob17447_Kill')
RegisterUnitEvent(17447, 4, 'mob17447_Die')
